package com.v1.video.domain;

import org.json.JSONObject;

import android.content.ContentValues;
import android.database.Cursor;

import com.iss.bean.BaseBean;
import com.iss.db.TableColumn;

public class SearchVideoInfo extends BaseBean<SearchVideoInfo>{
//    @TableColumn(type = TableColumn.Types.TEXT,  isIndex = true, isNotNull = true)
    @TableColumn(type = TableColumn.Types.TEXT)
    public String create_time = "";//时间
    @TableColumn(type = TableColumn.Types.TEXT)
    public String detail = "";//详情
    @TableColumn(type = TableColumn.Types.TEXT)
    public String imgUrl = "";//video图片
    @TableColumn(type = TableColumn.Types.TEXT)
    public String region = "";//地区
    @TableColumn(type = TableColumn.Types.TEXT)
    public String sex = "";//性别
    @TableColumn(type = TableColumn.Types.TEXT)
    public String userId = "";
    @TableColumn(type = TableColumn.Types.TEXT)
    public String userImg = "";//图像
    @TableColumn(type = TableColumn.Types.TEXT)
    public String userName = "";
    @TableColumn(type = TableColumn.Types.TEXT)
    public String videoId = "";
    @TableColumn(type = TableColumn.Types.TEXT)
    public String videoUrl = "";
    @TableColumn(type = TableColumn.Types.TEXT)
    public String playNum = "";//播放次数
    @TableColumn(type = TableColumn.Types.TEXT)
    public String praise = "";//点赞次数
    @TableColumn(type = TableColumn.Types.TEXT)
    public String comments = "";//评论次数
    @TableColumn(type = TableColumn.Types.TEXT)
    public String forward = ""; //转发次数
    @TableColumn(type = TableColumn.Types.TEXT)
    public String href = ""; //新闻的视频详情页的链接
    @TableColumn(type = TableColumn.Types.TEXT)
    public String stype = ""; //0表示新闻的视频1表示拍客的视频
    @TableColumn(type = TableColumn.Types.TEXT)
    public String title = ""; 
    @TableColumn(type = TableColumn.Types.INTEGER)
    public int state = 0;//0表示未读 1表示已读
    
    
    @Override
    public SearchVideoInfo cursorToBean(Cursor cursor) {
        // TODO Auto-generated method stub
        create_time = cursor.getString(cursor.getColumnIndex("create_time"));
        detail = cursor.getString(cursor.getColumnIndex("detail"));
        imgUrl = cursor.getString(cursor.getColumnIndex("imgUrl"));
        region = cursor.getString(cursor.getColumnIndex("region"));
        sex = cursor.getString(cursor.getColumnIndex("sex"));
        userId = cursor.getString(cursor.getColumnIndex("userId"));
        userImg = cursor.getString(cursor.getColumnIndex("userImg"));
        userName = cursor.getString(cursor.getColumnIndex("userName"));
        videoId = cursor.getString(cursor.getColumnIndex("videoId"));  
        videoUrl =  cursor.getString(cursor.getColumnIndex("videoUrl"));
        playNum =  cursor.getString(cursor.getColumnIndex("playNum"));
        praise =  cursor.getString(cursor.getColumnIndex("praise"));
        comments =  cursor.getString(cursor.getColumnIndex("comments"));
        forward =  cursor.getString(cursor.getColumnIndex("forward"));
        href =  cursor.getString(cursor.getColumnIndex("href"));
        stype =  cursor.getString(cursor.getColumnIndex("stype"));
        title =  cursor.getString(cursor.getColumnIndex("title"));
        state =  cursor.getInt(cursor.getColumnIndex("state"));
        return this;
    }
    @Override
    public ContentValues beanToValues() {
        // TODO Auto-generated method stub
        ContentValues values = new ContentValues();
        values.put("create_time", create_time);
        values.put("detail", detail);
        values.put("imgUrl", imgUrl);
        values.put("region", region);
        values.put("sex", sex);
        values.put("userId", userId);
        values.put("userImg", userImg);
        values.put("userName", userName);
        values.put("videoId", videoId);
        values.put("videoUrl", videoUrl);
        values.put("playNum", playNum);
        values.put("praise", praise);
        values.put("comments", comments);
        values.put("forward", forward);
        values.put("href", href);
        values.put("stype", stype);
        values.put("title", title);
        values.put("state", state);
        return values;
    }
    
    public String getUserId() {
        return userId;
    }
    public void setUserId(String userId) {
        this.userId = userId;
    }
    public String getCreate_time() {
        return create_time;
    }
    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }
    public String getDetail() {
        return detail;
    }
    public void setDetail(String detail) {
        this.detail = detail;
    }
    public String getImgUrl() {
        return imgUrl;
    }
    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }
    public String getRegion() {
        return region;
    }
    public void setRegion(String region) {
        this.region = region;
    }
    public String getSex() {
        return sex;
    }
    public void setSex(String sex) {
        this.sex = sex;
    }
    public String getUserImg() {
        return userImg;
    }
    public void setUserImg(String userImg) {
        this.userImg = userImg;
    }
    public String getUserName() {
        return userName;
    }
    public void setUserName(String userName) {
        this.userName = userName;
    }
    public String getVideoId() {
        return videoId;
    }
    public void setVideoId(String videoId) {
        this.videoId = videoId;
    }
    public String getVideoUrl() {
        return videoUrl;
    }
    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }
    public String getPlayNum() {
        return playNum;
    }
    public void setPlayNum(String playNum) {
        this.playNum = playNum;
    }
    public String getPraise() {
        return praise;
    }
    public void setPraise(String praise) {
        this.praise = praise;
    }
    public String getComments() {
        return comments;
    }
    public void setComments(String comments) {
        this.comments = comments;
    }
    public String getForward() {
        return forward;
    }
    public void setForward(String forward) {
        this.forward = forward;
    }
    
    public String getHref() {
        return href;
    }
    public void setHref(String href) {
        this.href = href;
    }
    public String getStype() {
        return stype;
    }
    public void setStype(String stype) {
        this.stype = stype;
    }
    public String getTitle() {
        return title;
    }
    public void setTitle(String title) {
        this.title = title;
    }
    public int getState() {
        return state;
    }
    public void setState(int state) {
        this.state = state;
    }
    @Override
    public SearchVideoInfo parseJSON(JSONObject jsonObj) {
        // TODO Auto-generated method stub
        return null;
    }
    @Override
    public JSONObject toJSON() {
        // TODO Auto-generated method stub
        return null;
    }
    
    
}
